package com.wangt.biz.service.impl;

import com.wangt.api.domain.DDevice;
import com.wangt.biz.mapper.DDeviceMapper;
import com.wangt.biz.service.DDeviceService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

@Service
@AllArgsConstructor
public class DDeviceServiceImpl implements DDeviceService {

    private final DDeviceMapper baseMapper;
    @Override
    public List<String> getTopicList() {
        List<String> collect = baseMapper.selectList().stream().map(DDevice::getTopic).collect(Collectors.toList());
        return collect;
    }
}
